package cn.wsalix.type;

public enum MessTypeEnum {
	product("0", "产品消息"),order("1", "订单消息"),tuan("2", "团购"),user("3", "用户消息"),;
	private String code;
	private String title;

	MessTypeEnum(String code, String title) {
		this.code = code;
		this.title = title;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public static MessTypeEnum findByCode(String code) {
		for (MessTypeEnum userKind : MessTypeEnum.values()) {
			if (userKind.getCode().equals(code)) {
				return userKind;
			}
		}
		return null;
	}

}
